package com.example.lab4.Controller;

import com.example.lab4.Mapper.*;
import com.example.lab4.Entity.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.List;

@Controller
public class 乘客Controller {
    @Autowired
    乘客Dao 乘客dao;

    @RequestMapping("/乘客")
    public String 乘客dao(Model m){
        List<乘客> 乘客s = 乘客dao.findAll();
        m.addAttribute("乘客",乘客s);
        return "乘客";
    }
}
